{% extends 'base.html' %}

{% block title %}注册{% endblock %}

{% block head %}
    <script src="{% static 'jquery/jquery-3.7.1.min.js' %}"></script>
    <script src="{% static 'js/register.js' %}"></script>
{% endblock %}

{% block main %}
    <div style="max-width: 330px;" class="m-auto">
        <h1>注册</h1>
        <form action="" method="POST">
            {% csrf_token %}
            <div class="mb-3">
                <label>用户名</label>
                <input type="text" name="username" class="form-control" placeholder="用户名">
            </div>
            <div class="mb-3">
                <label>邮箱</label>
                <input type="email" name="email" class="form-control" placeholder="邮箱">
            </div>
            <div class="mb-3">
                <label>验证码</label>
                <div class="input-group">
                    <input type="text" class="form-control" name="captcha" placeholder="验证码"
                           aria-label="Recipient's username" aria-describedby="button-addon2">
                    <button class="btn btn-outline-secondary" type="button" id="captcha-btn">获取验证码</button>
                </div>
            </div>

            <div class="mb-3">
                <label>密码</label>
                <input type="password" name="password" class="form-control" placeholder="密码">
            </div>

            <div class="mb-3">
                <label for="id_user_type">用户类型</label>
                <select class="form-select" name="user_type" aria-label="用户类型选择">
                    <option value="individual">个人用户</option>
                    <option value="company">企业用户</option>
                </select>
            </div>

            <div class="mb-3">
                <button class="btn btn-success w-100">立即注册</button>
            </div>
        </form>
    </div>
{% endblock %}
